3.5.45 \(\int \frac {(g+h x)^2}{a+b \log (c (d (e+f x)^p)^q)} \, dx\) [445]

Optimal. Leaf size=279 \[ \frac {e^{-\frac {a}{b p q}} (f g-e h)^2 (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {Ei}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^3 p q}+\frac {2 e^{-\frac {2 a}{b p q}} h (f g-e h) (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {Ei}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}+\frac {e^{-\frac {3 a}{b p q}} h^2 (e+f x)^3 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {Ei}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q} \]

[Out]

(-e*h+f*g)^2*(f*x+e)*Ei((a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b/exp(a/b/p/q)/f^3/p/q/((c*(d*(f*x+e)^p)^q)^(1/p/q)
)+2*h*(-e*h+f*g)*(f*x+e)^2*Ei(2*(a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b/exp(2*a/b/p/q)/f^3/p/q/((c*(d*(f*x+e)^p)^
q)^(2/p/q))+h^2*(f*x+e)^3*Ei(3*(a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)/b/exp(3*a/b/p/q)/f^3/p/q/((c*(d*(f*x+e)^p)^q
)^(3/p/q))

________________________________________________________________________________________

Rubi [A]
time = 0.53, antiderivative size = 279, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2446, 2436, 2337, 2209, 2437, 2347, 2495} \begin {gather*} \frac {2 h (e+f x)^2 e^{-\frac {2 a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {Ei}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}+\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {Ei}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^3 p q}+\frac {h^2 (e+f x)^3 e^{-\frac {3 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {Ei}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^2/(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

((f*g - e*h)^2*(e + f*x)*ExpIntegralEi[(a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q)])/(b*E^(a/(b*p*q))*f^3*p*q*(c*
(d*(e + f*x)^p)^q)^(1/(p*q))) + (2*h*(f*g - e*h)*(e + f*x)^2*ExpIntegralEi[(2*(a + b*Log[c*(d*(e + f*x)^p)^q])
)/(b*p*q)])/(b*E^((2*a)/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p)^q)^(2/(p*q))) + (h^2*(e + f*x)^3*ExpIntegralEi[(3*
(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)])/(b*E^((3*a)/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p)^q)^(3/(p*q)))

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2446

Int[((f_.) + (g_.)*(x_))^(q_.)/((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.)), x_Symbol] :> Int[ExpandIn
tegrand[(f + g*x)^q/(a + b*Log[c*(d + e*x)^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g,
 0] && IGtQ[q, 0]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin {align*} \int \frac {(g+h x)^2}{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx &=\text {Subst}\left (\int \frac {(g+h x)^2}{a+b \log \left (c d^q (e+f x)^{p q}\right )} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\int \left (\frac {(f g-e h)^2}{f^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}+\frac {2 h (f g-e h) (e+f x)}{f^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}+\frac {h^2 (e+f x)^2}{f^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\frac {h^2 \int \frac {(e+f x)^2}{a+b \log \left (c d^q (e+f x)^{p q}\right )} \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 h (f g-e h)) \int \frac {e+f x}{a+b \log \left (c d^q (e+f x)^{p q}\right )} \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h)^2 \int \frac {1}{a+b \log \left (c d^q (e+f x)^{p q}\right )} \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\frac {h^2 \text {Subst}\left (\int \frac {x^2}{a+b \log \left (c d^q x^{p q}\right )} \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 h (f g-e h)) \text {Subst}\left (\int \frac {x}{a+b \log \left (c d^q x^{p q}\right )} \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h)^2 \text {Subst}\left (\int \frac {1}{a+b \log \left (c d^q x^{p q}\right )} \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\frac {\left (h^2 (e+f x)^3 \left (c d^q (e+f x)^{p q}\right )^{-\frac {3}{p q}}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{p q}}}{a+b x} \, dx,x,\log \left (c d^q (e+f x)^{p q}\right )\right )}{f^3 p q},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (2 h (f g-e h) (e+f x)^2 \left (c d^q (e+f x)^{p q}\right )^{-\frac {2}{p q}}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{p q}}}{a+b x} \, dx,x,\log \left (c d^q (e+f x)^{p q}\right )\right )}{f^3 p q},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left ((f g-e h)^2 (e+f x) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{p q}}}{a+b x} \, dx,x,\log \left (c d^q (e+f x)^{p q}\right )\right )}{f^3 p q},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {e^{-\frac {a}{b p q}} (f g-e h)^2 (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {Ei}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{b f^3 p q}+\frac {2 e^{-\frac {2 a}{b p q}} h (f g-e h) (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {Ei}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}+\frac {e^{-\frac {3 a}{b p q}} h^2 (e+f x)^3 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {Ei}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{b f^3 p q}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.48, size = 252, normalized size = 0.90 \begin {gather*} \frac {e^{-\frac {3 a}{b p q}} (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \left (e^{\frac {2 a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {2}{p q}} \text {Ei}\left (\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )-h (e+f x) \left (-2 e^{\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {1}{p q}} \text {Ei}\left (\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )-h (e+f x) \text {Ei}\left (\frac {3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )\right )\right )}{b f^3 p q} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(g + h*x)^2/(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

((e + f*x)*(E^((2*a)/(b*p*q))*(f*g - e*h)^2*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*ExpIntegralEi[(a + b*Log[c*(d*(e +
 f*x)^p)^q])/(b*p*q)] - h*(e + f*x)*(-2*E^(a/(b*p*q))*(f*g - e*h)*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*ExpIntegralE
i[(2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)] - h*(e + f*x)*ExpIntegralEi[(3*(a + b*Log[c*(d*(e + f*x)^p)^q]
))/(b*p*q)])))/(b*E^((3*a)/(b*p*q))*f^3*p*q*(c*(d*(e + f*x)^p)^q)^(3/(p*q)))

________________________________________________________________________________________

Maple [F]
time = 0.19, size = 0, normalized size = 0.00 \[\int \frac {\left (h x +g \right )^{2}}{a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q)),x)

[Out]

int((h*x+g)^2/(a+b*ln(c*(d*(f*x+e)^p)^q)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="maxima")

[Out]

integrate((h*x + g)^2/(b*log(((f*x + e)^p*d)^q*c) + a), x)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 244, normalized size = 0.87 \begin {gather*} \frac {{\left (h^{2} \operatorname {log\_integral}\left ({\left (f^{3} x^{3} + 3 \, f^{2} x^{2} e + 3 \, f x e^{2} + e^{3}\right )} e^{\left (\frac {3 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}\right ) + 2 \, {\left (f g h - h^{2} e\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )} \operatorname {log\_integral}\left ({\left (f^{2} x^{2} + 2 \, f x e + e^{2}\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}\right ) + {\left (f^{2} g^{2} - 2 \, f g h e + h^{2} e^{2}\right )} e^{\left (\frac {2 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )} \operatorname {log\_integral}\left ({\left (f x + e\right )} e^{\left (\frac {b q \log \left (d\right ) + b \log \left (c\right ) + a}{b p q}\right )}\right )\right )} e^{\left (-\frac {3 \, {\left (b q \log \left (d\right ) + b \log \left (c\right ) + a\right )}}{b p q}\right )}}{b f^{3} p q} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="fricas")

[Out]

(h^2*log_integral((f^3*x^3 + 3*f^2*x^2*e + 3*f*x*e^2 + e^3)*e^(3*(b*q*log(d) + b*log(c) + a)/(b*p*q))) + 2*(f*
g*h - h^2*e)*e^((b*q*log(d) + b*log(c) + a)/(b*p*q))*log_integral((f^2*x^2 + 2*f*x*e + e^2)*e^(2*(b*q*log(d) +
 b*log(c) + a)/(b*p*q))) + (f^2*g^2 - 2*f*g*h*e + h^2*e^2)*e^(2*(b*q*log(d) + b*log(c) + a)/(b*p*q))*log_integ
ral((f*x + e)*e^((b*q*log(d) + b*log(c) + a)/(b*p*q))))*e^(-3*(b*q*log(d) + b*log(c) + a)/(b*p*q))/(b*f^3*p*q)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (g + h x\right )^{2}}{a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**2/(a+b*ln(c*(d*(f*x+e)**p)**q)),x)

[Out]

Integral((g + h*x)**2/(a + b*log(c*(d*(e + f*x)**p)**q)), x)

________________________________________________________________________________________

Giac [A]
time = 5.19, size = 524, normalized size = 1.88 \begin {gather*} \frac {g^{2} {\rm Ei}\left (\frac {\log \left (d\right )}{p} + \frac {\log \left (c\right )}{p q} + \frac {a}{b p q} + \log \left (f x + e\right )\right ) e^{\left (-\frac {a}{b p q}\right )}}{b c^{\frac {1}{p q}} d^{\left (\frac {1}{p}\right )} f p q} - \frac {2 \, g h {\rm Ei}\left (\frac {\log \left (d\right )}{p} + \frac {\log \left (c\right )}{p q} + \frac {a}{b p q} + \log \left (f x + e\right )\right ) e^{\left (-\frac {a}{b p q} + 1\right )}}{b c^{\frac {1}{p q}} d^{\left (\frac {1}{p}\right )} f^{2} p q} + \frac {2 \, g h {\rm Ei}\left (\frac {2 \, \log \left (d\right )}{p} + \frac {2 \, \log \left (c\right )}{p q} + \frac {2 \, a}{b p q} + 2 \, \log \left (f x + e\right )\right ) e^{\left (-\frac {2 \, a}{b p q}\right )}}{b c^{\frac {2}{p q}} d^{\frac {2}{p}} f^{2} p q} + \frac {h^{2} {\rm Ei}\left (\frac {\log \left (d\right )}{p} + \frac {\log \left (c\right )}{p q} + \frac {a}{b p q} + \log \left (f x + e\right )\right ) e^{\left (-\frac {a}{b p q} + 2\right )}}{b c^{\frac {1}{p q}} d^{\left (\frac {1}{p}\right )} f^{3} p q} - \frac {2 \, h^{2} {\rm Ei}\left (\frac {2 \, \log \left (d\right )}{p} + \frac {2 \, \log \left (c\right )}{p q} + \frac {2 \, a}{b p q} + 2 \, \log \left (f x + e\right )\right ) e^{\left (-\frac {2 \, a}{b p q} + 1\right )}}{b c^{\frac {2}{p q}} d^{\frac {2}{p}} f^{3} p q} + \frac {h^{2} {\rm Ei}\left (\frac {3 \, \log \left (d\right )}{p} + \frac {3 \, \log \left (c\right )}{p q} + \frac {3 \, a}{b p q} + 3 \, \log \left (f x + e\right )\right ) e^{\left (-\frac {3 \, a}{b p q}\right )}}{b c^{\frac {3}{p q}} d^{\frac {3}{p}} f^{3} p q} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2/(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="giac")

[Out]

g^2*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q))/(b*c^(1/(p*q))*d^(1/p)*f*p*q) - 2*g*
h*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q) + 1)/(b*c^(1/(p*q))*d^(1/p)*f^2*p*q) +
2*g*h*Ei(2*log(d)/p + 2*log(c)/(p*q) + 2*a/(b*p*q) + 2*log(f*x + e))*e^(-2*a/(b*p*q))/(b*c^(2/(p*q))*d^(2/p)*f
^2*p*q) + h^2*Ei(log(d)/p + log(c)/(p*q) + a/(b*p*q) + log(f*x + e))*e^(-a/(b*p*q) + 2)/(b*c^(1/(p*q))*d^(1/p)
*f^3*p*q) - 2*h^2*Ei(2*log(d)/p + 2*log(c)/(p*q) + 2*a/(b*p*q) + 2*log(f*x + e))*e^(-2*a/(b*p*q) + 1)/(b*c^(2/
(p*q))*d^(2/p)*f^3*p*q) + h^2*Ei(3*log(d)/p + 3*log(c)/(p*q) + 3*a/(b*p*q) + 3*log(f*x + e))*e^(-3*a/(b*p*q))/
(b*c^(3/(p*q))*d^(3/p)*f^3*p*q)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (g+h\,x\right )}^2}{a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q)),x)

[Out]

int((g + h*x)^2/(a + b*log(c*(d*(e + f*x)^p)^q)), x)

________________________________________________________________________________________